﻿#include "hzpch.h"
#include "VertexArray.h"
#include "SourceCode/Renderer/Renderer.h"
#include "SourceCode/Platforms/OpenGL/OpenGLVertexArray.h"

namespace Hazal
{
	Ref<CVertexArray> CVertexArray::Create()
	{
		switch (CRenderer::GetAPI())
		{
		case CRendererAPI::API::None:
			HZ_ASSERT(false, "RendererAPI::None is currently not supported!");
			return nullptr;
		case CRendererAPI::API::OpenGL:
			return std::make_shared<COpenGLVertexArray>();
		default:
			break;
		}

		return nullptr;
	}
}